//
//  MyLevel.m
//  Brand
//
//  Created by Woody Yan on 5/22/14.
//  Copyright (c) 2014 Faker. All rights reserved.
//

#import "MyLevel.h"

@implementation MyLevel

- (id)initWithType:(NSString *)type picUrl:(NSString *)picUrl name:(NSString *)name reason:(NSString *)reason;
{
	if ([super init]) {
		self.type = type;
		self.picUrl = picUrl;
		self.name = name;
        self.reason = reason;
	}
	return self;
}

- (void)encodeWithCoder:(NSCoder *)aCoder
{
    [aCoder encodeObject:self.type forKey:@"1"];
    [aCoder encodeObject:self.picUrl forKey:@"2"];
    [aCoder encodeObject:self.name forKey:@"3"];
    [aCoder encodeObject:self.reason forKey:@"4"];
}

- (id)initWithCoder:(NSCoder *)aDecoder
{
    self = [super init];
    if (self){
        self.type = [aDecoder decodeObjectForKey:@"1"];
        self.picUrl = [aDecoder decodeObjectForKey:@"2"];
        self.name = [aDecoder decodeObjectForKey:@"3"];
        self.reason = [aDecoder decodeObjectForKey:@"4"];
    }
    return self;
}



@end
